\(\int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx\) [51]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 14 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {\cot (x)}{\sqrt {a \csc ^2(x)}} \]

[Out]

-cot(x)/(a*csc(x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4207, 197} \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {\cot (x)}{\sqrt {a \csc ^2(x)}} \]

[In]

Int[1/Sqrt[a*Csc[x]^2],x]

[Out]

-(Cot[x]/Sqrt[a*Csc[x]^2])

Rule 197

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1)/a), x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = -\left (a \text {Subst}\left (\int \frac {1}{\left (a+a x^2\right )^{3/2}} \, dx,x,\cot (x)\right )\right ) \\ & = -\frac {\cot (x)}{\sqrt {a \csc ^2(x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {\cot (x)}{\sqrt {a \csc ^2(x)}} \]

[In]

Integrate[1/Sqrt[a*Csc[x]^2],x]

[Out]

-(Cot[x]/Sqrt[a*Csc[x]^2])

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.57

method result size
default \(\frac {\sin \left (x \right ) \sqrt {4}}{2 \sqrt {a \csc \left (x \right )^{2}}\, \left (\cos \left (x \right )-1\right )}\) \(22\)
risch \(-\frac {i {\mathrm e}^{2 i x}}{2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}-\frac {i}{2 \left ({\mathrm e}^{2 i x}-1\right ) \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}}\) \(69\)

[In]

int(1/(a*csc(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*sin(x)/(a*csc(x)^2)^(1/2)/(cos(x)-1)*4^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.57 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {\sqrt {-\frac {a}{\cos \left (x\right )^{2} - 1}} \cos \left (x\right ) \sin \left (x\right )}{a} \]

[In]

integrate(1/(a*csc(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-a/(cos(x)^2 - 1))*cos(x)*sin(x)/a

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=- \frac {\cot {\left (x \right )}}{\sqrt {a \csc ^{2}{\left (x \right )}}} \]

[In]

integrate(1/(a*csc(x)**2)**(1/2),x)

[Out]

-cot(x)/sqrt(a*csc(x)**2)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.93 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {1}{\sqrt {\tan \left (x\right )^{2} + 1} \sqrt {a}} \]

[In]

integrate(1/(a*csc(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/(sqrt(tan(x)^2 + 1)*sqrt(a))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (12) = 24\).

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 2.43 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=\frac {2 \, \mathrm {sgn}\left (\sin \left (x\right )\right )}{\sqrt {a}} + \frac {2}{\sqrt {a} {\left (\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 1\right )} \mathrm {sgn}\left (\sin \left (x\right )\right )} \]

[In]

integrate(1/(a*csc(x)^2)^(1/2),x, algorithm="giac")

[Out]

2*sgn(sin(x))/sqrt(a) + 2/(sqrt(a)*((cos(x) - 1)/(cos(x) + 1) - 1)*sgn(sin(x)))

Mupad [B] (verification not implemented)

Time = 16.95 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07 \[ \int \frac {1}{\sqrt {a \csc ^2(x)}} \, dx=-\frac {\sin \left (2\,x\right )}{2\,\sqrt {a}\,\sqrt {{\sin \left (x\right )}^2}} \]

[In]

int(1/(a/sin(x)^2)^(1/2),x)

[Out]

-sin(2*x)/(2*a^(1/2)*(sin(x)^2)^(1/2))